package com.lpf.back.service.interfaces;

import com.lpf.back.common.CommonRes;
import com.lpf.back.domain.Activity;
import com.lpf.back.domain.Comment;
import com.lpf.back.domain.Dynamic;
import com.lpf.back.domain.User;
import com.lpf.back.domain.vo.UserCommentVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


public interface UserService {

    /**
     * 用户登录功能
     * @param username
     * @param password
     * @return
     */
    CommonRes login(String username, String password);

    /**
     * 用户注册功能
     * @param user
     * @return
     */
    int register(User user);

    /**
     * 获取用户相关信息通过用户名
     * @param username
     * @return
     */
    User getInfo(String username);

    /**
     * 用户给活动点赞功能
     * @param user
     * @param activity
     */
    void userLikeActivity(User user, Activity activity);

    /**
     * 获取用户列表
     * @return
     */
    List<User> getAllUsers();

    int setNickName(String nickname, Integer id);

    int changePassword(String password, Integer id);

    CommonRes setAvatar(HttpServletRequest request);

    Dynamic likes(Integer dynamicid, Integer userid);

    List<UserCommentVO> comment(Integer dynamicid);

    Comment commitComment(Comment comment);

    User getUserById(Integer id);

    int updateStatus(Integer id);
}
